<?php

//自定义方法
//视图控制
function view($template, $vars = array())
{
	extract($vars);
	if (is_array($template))
	{
		foreach ($template as $k)
		{
			$cl = strtolower(get_class($k));
			include "v/_$cl.php";
		}
	} else
	{
		include "v/$template.php";
	}
}

// title
function formatTitle($title = '')
{
	if ($title)
	{
		$title.= ' | ';
	}

	$title .= $GLOBALS['defaultTitle'];

	return $title;
}

?>